package Code.ClassDefinition;

public class PhoneTest {
    public static void main(String[] args) {
        //创建对象
        Phone  p = new Phone();

        //赋值
        p.brand = "小米";
        p.price = 1999;

        //获取对象的值
        System.out.println(p.brand);
        System.out.println(p.price);

        //调用对象方法
        p.call();
        p.playGame();


        Phone p2 = new Phone();
        p2.brand= "苹果";
        p2.price = 8000;

        p2.call();
        p2.playGame();
    }
}
